﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Windows.Input;
using System.Windows.Media;

namespace TimersXP
{
    /// <summary>A small data structure to hold a single skin item.</summary>
    public class SkinItem //: INotifyPropertyChanged
    {
        #region Class Variables
        /// <summary>The skin name</summary>
        private string skinName;
        /// <summary>The base skin name</summary>
        private string baseSkinName;
        /// <summary>The skin path</summary>
        private string skinPath;
        /// <summary>The action to be taken when switching skins.</summary>
        private ICommand action;
        /// <summary>The icon of the skin.</summary>
        private Brush icon;
        #endregion Class Variables

        #region Constructors
        /// <summary>Initializes a new instance of the <see cref="SkinItem"/> class.</summary>
        public SkinItem() { }

        /// <summary>Initializes a new instance of the <see cref="SkinItem" /> class.</summary>
        /// <param name="newSkinName">The name of the new skin.</param>
        /// <param name="baseSkinName">Name of the base skin.</param>
        /// <param name="newSkinPath">Optional Parameter: The new skin path.</param>
        /// <param name="newSkinAction">Optional Parameter: The new skin action to be taken when switching to the new skin.</param>
        /// <param name="newSkinIcon">Optional Parameter: The new skin icon.</param>
        public SkinItem(string newSkinName, string baseSkinName = "", string newSkinPath = "", ICommand newSkinAction = null, Brush newSkinIcon = null)
        {
            if (newSkinName != "")
                this.skinName = newSkinName;

            if (baseSkinName != "")
                this.baseSkinName = baseSkinName;

            if (newSkinPath != "")
                this.skinPath = newSkinPath;

            if (newSkinAction != null)
                this.action = newSkinAction;

            if (newSkinIcon != null)
                this.icon = newSkinIcon;
        }
        #endregion Constructors

        #region Properties
        /// <summary>Gets or sets the name of the skin.</summary>
        /// <value>The name of the skin.</value>
        public string SkinName
        {
            get { return this.skinName; }
            set
            {
                if (this.skinName != value)
                {
                    this.skinName = value;
                    //OnPropertyChanged(() => this.SkinName);
                }
            }
        }

        /// <summary>Gets or sets the name of the base skin.</summary>
        /// <value>The name of the base skin.</value>
        public string BaseSkinName
        {
            get { return this.baseSkinName; }
            set
            {
                if (this.baseSkinName != value)
                {
                    this.baseSkinName = value;
                    //OnPropertyChanged(() => this.BaseSkinName);
                }
            }
        }

        /// <summary>Gets or sets the skin path.</summary>
        /// <value>The skin path.</value>
        public string SkinPath
        {
            get { return this.skinPath; }
            set
            {
                if (this.skinPath != value)
                {
                    this.skinPath = value;
                    //OnPropertyChanged(() => this.SkinPath);
                }
            }
        }

        /// <summary>Gets or sets the action.</summary>
        /// <value>The action.</value>
        public ICommand Action
        {
            get { return this.action; }
            set
            {
                if (this.action != value)
                {
                    this.action = value;
                    //OnPropertyChanged(() => this.Action);
                }
            }
        }

        /// <summary>Gets or sets the icon.</summary>
        /// <value>The icon.</value>
        public Brush Icon
        {
            get { return this.icon; }
            set
            {
                if (this.icon != value)
                {
                    this.icon = value;
                    //OnPropertyChanged(() => this.Icon);
                }
            }
        }
        #endregion Properties
    }
}
